home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / Hello / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-12-16  |  2.9 KB  |  112 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Part.h
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef PART_H
  11. #define PART_H
  12.  
  13. #ifndef DEFINES_K
  14. #include "Defines.k"
  15. #endif
  16.  
  17. // ----- Framework Includes -----
  18.  
  19. #ifndef FWPART_H
  20. #include "FWPart.h"
  21. #endif
  22.  
  23. // ----- OS Layer -----
  24.  
  25. #ifndef FWRESFIL_H
  26. #include "FWResFil.h"
  27. #endif
  28.  
  29. // ----- Foundation Layer -----
  30.  
  31. #ifndef FWSTDDEF_H
  32. #include "FWStdDef.h"
  33. #endif
  34.  
  35. #ifndef FWBNDSTR_H
  36. #include "FWBndStr.h"
  37. #endif
  38.  
  39.  
  40. //========================================================================================
  41. // Constants
  42. //========================================================================================
  43.  
  44. // Values for the draftChanged and frameContentChanged arguments of PartChanged
  45. #define kMarkDraft        true
  46. #define kDontMarkDraft    false
  47. #define kMarkFrame        true
  48. #define kDontMarkFrame    false
  49.  
  50. //========================================================================================
  51. // Forward Declarations
  52. //========================================================================================
  53.  
  54. class CHelloContent;
  55.  
  56. //========================================================================================
  57. // CHelloPart
  58. //========================================================================================
  59.  
  60. class CHelloPart : public FW_CPart
  61. {
  62. //----------------------------------------------------------------------------------------
  63. //    Initialization/Destruction
  64. //
  65. public:
  66.  
  67.     FW_DECLARE_AUTO(CHelloPart)
  68.     
  69.     CHelloPart(ODPart* odPart);
  70.     virtual ~CHelloPart();
  71.  
  72.     virtual void Initialize(Environment* ev, ODStorageUnit* storageUnit, FW_Boolean fromStorage);
  73.  
  74. //----------------------------------------------------------------------------------------
  75. //    Inherited API
  76. //
  77. public:
  78.     virtual FW_CContent*        NewPartContent(Environment* ev);
  79.  
  80.     virtual FW_CFrame*            NewFrame(Environment* ev,
  81.                                      ODFrame* odFrame,
  82.                                      FW_CPresentation* presentation,
  83.                                      FW_Boolean fromStorage);
  84.  
  85.     virtual FW_Handled            DoAdjustMenus(Environment* ev,
  86.                                     FW_CMenuBar* menuBar, 
  87.                                     FW_Boolean hasMenuFocus,
  88.                                     FW_Boolean isRoot);
  89.  
  90.     virtual FW_Handled            DoMenu(Environment* ev,
  91.                                       const FW_CMenuEvent& theMenuEvent);
  92.  
  93.     virtual FW_Handled            DoAbout(Environment* ev);
  94.     
  95. //----------------------------------------------------------------------------------------
  96. //    New API
  97. //
  98. public:
  99.     void                    PartChanged(Environment* ev, FW_Boolean draftChanged, 
  100.                                     FW_Boolean frameContentChanged);
  101.         // Call this after changing part data, to notify the proper authorities
  102.  
  103. //----------------------------------------------------------------------------------------
  104. //    Data Members
  105. //
  106. private:
  107.     CHelloContent*            fPartContent;
  108.     FW_CPresentation*        fPresentation;
  109. };
  110.  
  111. #endif
  112.